// 页面渲染
var id = $.getUrlParam('id');

$('#submit').click(function(){

	var data = $('#from').serialize();

	data = data+'&id='+id;
	// console.log($('#from').serialize());return;
	var btn = $(this).button('loading')

	$.post("/event/update",
			data,
			function(result){
	            if(result.status == true){
	              	
					$.successAlert(result.msg);

					setTimeout(function (){window.location.href='/event'}, 3000)
	            }else{
	            	$.errorAlert(result.msg);
	            	
					btn.button('reset')

					return false;	
	            }
	},"json");

})